package com.sptpc.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import com.sptpc.service.ProductService;


@Controller
public class HomeController {
	@Autowired
	private ProductService productService ;
	@RequestMapping(value="/" ,method=RequestMethod.GET)
	public String home(Model model){
		model.addAttribute("hlist",productService.getHotProduct);
		return "index";
	}

}
